type Foo = string | number;

function controlFlowAnalysisWithNever(foo: Foo) {
  if (typeof foo === "string") {
  } else if (typeof foo === "number") {
  } else {
    const check: never = foo;
  }
}
